<div data-dux="table-bind">
    <div class="dux-page-header am-cf">
        <div class="page-title">
            <form class="am-form-inline" method="get" action="{url()}">
                <div class="am-form-group">
                    <input type="text" name="username" class="am-form-field" value="{$pageMaps.username}" placeholder="搜索">
                </div>
                <div class="am-form-group">
                    <select name="level" class="am-form-field">
                        <option value="0">全部等级</option>
                        <!--loop{$levelList as $vo}-->
                        <option value="{$vo.level_id}" {$pageMaps.level == $vo.level_id ? 'selected' : ''} >{$vo.name}</option>
                        <!--{/loop}-->
                    </select>
                </div>
                <div class="am-form-group">
                    <select name="agent" class="am-form-field">
                        <option value="0">全部类型</option>
                        <option value="1" {$pageMaps.agent == 1 ? 'selected' : ''} >分销商</option>
                        <option value="2" {$pageMaps.agent == 2 ? 'selected' : ''} >普通用户</option>
                    </select>
                </div>
                <div class="am-form-group">
                    <button type="submit" class="am-btn am-btn-primary am-icon-search"></button>
                </div>
            </form>
        </div>
        <div class="page-action">
            <a class="am-btn am-btn-danger" href="javascript:location.reload();"><i class="am-icon-refresh"></i></a>
        </div>
    </div>
    <div class="dux-page-table">
        <table class="am-table dux-table" data-table>
            <thead>
            <tr>
                <th width="100">#</th>
                <th>用户</th>
                <th class="am-text-center">分销商</th>
                <th class="am-text-center">分销等级</th>
                <th>上级分销商</th>
                <th>分销金额</th>
                <th>加入时间</th>
                <th class="am-text-center">状态</th>
                <th class="am-text-center" width="140">操作</th>
            </tr>
            </thead>
            <tbody>
            <!--loop{$list as $vo}-->
            <tr>
                <th>{$vo.user_id}</th>
                <td><a data-dux="dialog-open" data-url="{url('member/MemberUser/dialogUser', ['id' => $vo.user_id])}" data-title="用户信息" data-height="250px" href="javascript:;">{$vo.show_name}</a></td>
                <!--if{!$vo.agent}-->
                <td class="am-danger am-text-center">
                    否
                <!--{else}-->
                <td class="am-success am-text-center">
                    是
                <!--{/if}-->
                </td>
                <td class="am-text-center">
                    <!--if{$vo.agent}-->
                    {$vo.level_name}
                    <!--{else}-->
                    无
                    <!--{/if}-->
                </td>
                <td>
                    <!--if{$vo.parent_name}-->
                    <a href="{url('index', ['parent_id' => $vo.parent_id])}">{$vo.parent_name}</a>
                    <!--{else}-->
                    无
                    <!--{/if}-->
                </td>
                <td>
                    {$vo.money}
                </td>
                <td>
                    <!--if{$vo.agent_time}-->
                    {date('Y-m-d H:i:s', $vo.agent_time)}
                    <!--{else}-->
                    无
                    <!--{/if}-->
                </td>
                <td class="am-text-center">
                    <!--if{$vo.status}-->
                    <span data-id="{$vo.id}" data-name="status" data-url="{url('status')}" data-status="1" class="am-text-success am-icon-circle"></span>
                    <!--{else}-->
                    <span data-id="{$vo.id}" data-name="status" data-url="{url('status')}" data-status="0" class="am-text-danger am-icon-circle"></span>
                    <!--{/if}-->
                </td>

                <td class="am-text-center">
                    <a class="am-btn am-btn-primary am-btn-xs"
                       href="{url('edit', ['id'=>$vo['id']])}" title="编辑"><i
                            class="am-icon-pencil"></i></a>
                    <a class="am-btn am-btn-danger am-btn-xs" href="javascript:;"
                       data-url="{url('del')}" data-id="{$vo.id}" title="删除" data-del><i
                            class=" am-icon-trash"></i></a>
                </td>
            </tr>
            <!--{/loop}-->
            <!--if{empty($list)}-->
            <tr>
                <td colspan="8" class="am-text-center">暂无分销账户</td>
            </tr>
            <!--{/if}-->
            </tbody>
        </table>
    </div>
    <div class="dux-page-foot am-cf">
        {$page}
    </div>
</div>